Skip to content

Make citest-jasmine pass locally #1211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 1, 2016
Merged

Make citest-jasmine pass locally #1211

merged 9 commits into from
Dec 1, 2016

Conversation

etpinard
Copy link
Contributor

resolves #666 (hopefully)

How good does this

image

feel?

cc @rreusser @n-riesco @alexcjohnson @monfera

@@ -45,11 +40,11 @@ describe('Plotly.downloadImage', function() {

it('should create link, remove link, accept options', function(done) {
downloadTest(gd, 'jpeg', done);
});
}, LONG_TIMEOUT_INTERVAL);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See jasmine/jasmine@68ba5b6 for example.

@@ -749,7 +749,7 @@ describe('hover on fill', function() {
}).then(function() {
return assertLabelsCorrect([237, 218], [266.75, 265], 'trace 1');
}).then(function() {
return assertLabelsCorrect([237, 251], [247.7, 254], 'trace 0');
return assertLabelsCorrect([237, 240], [247.7, 254], 'trace 0');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @alexcjohnson these cases ⬆️ were tuned for FF on CI and Chrome locally. Now, they work locally in FF and Chrome as well as FF on CI.

@etpinard
Copy link
Contributor Author

etpinard commented Nov 30, 2016

Note that npm run test-jasmine (i.e. running all the tests in Chrome locally) still fails from time to time. Something is up with the gl2d tests. This fix will be for a different PR.

@rreusser
Copy link
Contributor

rreusser commented Dec 1, 2016

This all works except for one test:

Firefox 50.0.0 (Mac OS X 10.11.0): Executed 716 of 1539 SUCCESS (0 secs / 1 min 30.653 secs)
Firefox 50.0.0 (Mac OS X 10.11.0) update menus interactions should relayout FAILED
	Expected 11 to be less than 11.
	assertItemDims@/var/folders/5s/mm8_jrls0zd34zkb1z71xb940000gp/T/tests/updatemenus_test.js:701:0 <- /var/folders/5s/mm8_jrls0zd34zkb1z71xb940000gp/T/40ed0cfc29821315921e9b4f89111e80.browserify:188035:9
	require<["/Users/rreusser/plotly/plotly.js/test/jasmine/tests/updatemenus_test.js"]</</</<@/var/folders/5s/mm8_jrls0zd34zkb1z71xb940000gp/T/tests/updatemenus_test.js:569:0 <- /var/folders/5s/mm8_jrls0zd34zkb1z71xb940000gp/T/40ed0cfc29821315921e9b4f89111e80.browserify:187903:13
Firefox 50.0.0 (Mac OS X 10.11.0): Executed 1539 of 1539 (1 FAILED) (4 mins 3.606 secs / 4 mins 0.075 secs)

That's my fault. Not clear why it's failing, but of course 569 is the one line out of many that I'm responsible for: updatemenus_test.js:569

@rreusser
Copy link
Contributor

rreusser commented Dec 1, 2016

For reference: conclusion after talking with @etpinard: change the 11 in the width comparison function to a 12. It's effectively hard-coding font layout on different platforms, which makes it an unsurprising failure. 11 -> 12 simply increases the tolerance just a touch. Otherwise tests pass for me 💃

@etpinard etpinard merged commit 2dbdf07 into master Dec 1, 2016
@etpinard etpinard deleted the fix-citest-jasmine branch December 1, 2016 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

npm run citest-jasmine fails locally
2 participants